package org.example;

/**
 * @AUTHOR 尹书岿
 * @DATE 2024/12/9 13:18
 * @DESCRIBE
 */
public class Point {
    double x;
    double y;
    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public String toString() {
        return "Point{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }

    public double getDistance(Point point) {
        return Math.sqrt(Math.pow(this.x - point.x,2) + Math.pow(this.y - point.y,2));
    }
}
